
		<?php 
			function flash($tep,$rong,$cao)
			{
				?>
					<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="<?php echo $rong; ?>" height="<?php echo $cao; ?>">
						  <param name="wmode" value="transparent" />
						  <param name="movie" value="<?php echo $tep; ?>" />
			
						  <param name="quality" value="high" />
						  <embed wmode="opaque" src="<?php echo $tep; ?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="<?php echo $rong; ?>" height="<?php echo $cao; ?>"></embed>
					</object>
				<?php
			}
			$tv="select * from advertising order by id desc";
			$tv_1=mysql_query($tv);
			while($tv_2=mysql_fetch_array($tv_1))
			{
				echo "<div class='tabs_advertising_left'>";
				$m=explode(".",$tv_2['name']);
				$duoi_file=$m[count($m)-1];
				$link_file="catalog/view/theme/default/image/advertise/".$tv_2['name'];
				$width=$tv_2['width'];
				$height=$tv_2['height'];
				$link_lien_ket=$tv_2['link'];
				if($duoi_file=="swf")
				{
					flash($link_file,$width,$height);
				}
				else 
				{
					echo "<a href='$link_lien_ket' target='_blank'>";
					echo "<img src='$link_file' width='$width'>";
					echo "</a>";
				}
				echo "</div>";
			}
			
			
		?>
<script>
	
</script>